import http from "./http"
//定义方法  统一管理请求


//获取课程列表
export function courseList(type,pageNum,pageSize) {
    let urlParams = new URLSearchParams()
    urlParams.append("type",type)
    urlParams.append("pageNum",pageNum)
    urlParams.append("pageSize",pageSize)

    return http.post("/course-api/weChat/applet/course/list/type",urlParams)
}

//登录
export function login(username,password) {
    let urlParams = new URLSearchParams()
    urlParams.append("username",username)
    urlParams.append("password",password)
    urlParams.append("rememberMe",true)

    return http.post("/course-api/pcUser/login",urlParams)
}

//获取个人信息
export function getUserInfo() {
    return http.get("/course-api/pcUser/login-user/info")
}
